package com.pethome.web.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pethome.common.annotation.Excel;
import com.pethome.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 信息管理对象 t_news
 * 
 * @author hjc
 * @date 2024-08-26
 */
@TableName("t_news")
public class News extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId("news_id")
    private Long newsId;

    /** 标题 */
    @Excel(name = "标题")
    private String newsTitle;

    /** 内容 */
    @Excel(name = "内容")
    private String newsText;

    /** 图片 */
    @Excel(name = "图片")
    private String newsImgs;

    /** 创建日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date newsCreateAt;

    /** 权重 */
    @Excel(name = "权重")
    private Long newsPower;

    /** 类型 */
    @Excel(name = "类型")
    private Long newsType;

    public void setNewsId(Long newsId) 
    {
        this.newsId = newsId;
    }

    public Long getNewsId() 
    {
        return newsId;
    }
    public void setNewsTitle(String newsTitle) 
    {
        this.newsTitle = newsTitle;
    }

    public String getNewsTitle() 
    {
        return newsTitle;
    }
    public void setNewsText(String newsText) 
    {
        this.newsText = newsText;
    }

    public String getNewsText() 
    {
        return newsText;
    }
    public void setNewsImgs(String newsImgs) 
    {
        this.newsImgs = newsImgs;
    }

    public String getNewsImgs() 
    {
        return newsImgs;
    }
    public void setNewsCreateAt(Date newsCreateAt) 
    {
        this.newsCreateAt = newsCreateAt;
    }

    public Date getNewsCreateAt() 
    {
        return newsCreateAt;
    }
    public void setNewsPower(Long newsPower) 
    {
        this.newsPower = newsPower;
    }

    public Long getNewsPower() 
    {
        return newsPower;
    }
    public void setNewsType(Long newsType) 
    {
        this.newsType = newsType;
    }

    public Long getNewsType() 
    {
        return newsType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("newsId", getNewsId())
            .append("newsTitle", getNewsTitle())
            .append("newsText", getNewsText())
            .append("newsImgs", getNewsImgs())
            .append("newsCreateAt", getNewsCreateAt())
            .append("newsPower", getNewsPower())
            .append("newsType", getNewsType())
            .toString();
    }
}
